package public

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"woo-server/services/public"
	"woo-server/services/system"
)

// @tags 权限
// @summary 登录code转登录态
// @Description 登录code转登录态
// @Accept json
// @Param code path string false "企业微信code"
// @Success 200 {string} json "{"StatusCode":200,"IsEncrypted":false,"Data":""}"
// @Router /api/login [get]
//func GetCaptcha(c *gin.Context) {
//
//	// 生成登录态
//	//result := services.GetCaptcha(c)
//
//	// 返回
//	//c.JSON(http.StatusOK, result)
//}
func Captcha(c *gin.Context) {
	// 生成登录态
	result := public.GetCaptcha(c)
	c.JSON(http.StatusOK, result)
}

func Configuration(c *gin.Context) {
	result := system.GetConfigs(c)
	c.JSON(http.StatusOK, result)
}
